package com.tovast.demo.service.impl;

import com.tovast.demo.domain.User;
import com.tovast.demo.repository.UserRepostiroy;
import com.tovast.demo.service.SecurityMangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zjp on 2016/9/24.
 */
@Service
public class SecurityMangeServiceJpaImpl implements SecurityMangeService{
    @Autowired
    private UserRepostiroy repostiroy;
    @Override
    public User registe(User user) {
        repostiroy.saveAndFlush(user);
        return user;
    }

    @Override
    public User destroy(User user) {
        repostiroy.delete(user);
        return user;
    }
}
